dataSource {
    pooled = true
    driverClassName = "org.hsqldb.jdbcDriver"
    username = "sa"
    password = ""
}
hibernate {
    cache.use_second_level_cache=true
    cache.use_query_cache=true
    //cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
    cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider'
}
// environment specific settings
environments {
    development {
        dataSource {
            dbCreate = "update" // one of 'create', 'create-drop','update'
            driverClassName = "org.postgresql.Driver"
            username = Configuracoes.username()
            password = Configuracoes.password()
            url =  Configuracoes.db()
         properties {
 	 maxActive = 1000
 	 maxIdle = 1000
 	 minIdle = 1
 	 initialSize = 5
 	 minEvictableIdleTimeMillis = 60000
 	 timeBetweenEvictionRunsMillis = 60000
 	 maxWait = 10000
 	 validationQuery = "select 1"
         testOnBorrow=true
         testOnReturn=true
         testWhileIdle=true
 	 }

        }
        hibernate{
            default_schema = "contratualizacao"
        }
    }
    test {
        dataSource {
            dbCreate = "update"
            url = "jdbc:hsqldb:mem:testDb"
        }
    }
    production {
        dataSource {
            driverClassName = "org.postgresql.Driver"
            username = Configuracoes.username()
            password = Configuracoes.password()
            url =      Configuracoes.db()
            properties {
 	    maxActive = 1000
 	    maxIdle = 1000
 	    minIdle = 1
 	    initialSize = 5
 	    minEvictableIdleTimeMillis = 60000
 	    timeBetweenEvictionRunsMillis = 60000
 	    maxWait = 10000
 	    validationQuery = "select 1"
            testOnBorrow=true
            testOnReturn=true
            testWhileIdle=true
 	 }


        }
        hibernate{
            default_schema = "contratualizacao"
        }
    }
}